package com.young.springdemo.service.command;

import java.util.ArrayList;
import java.util.List;

//主菜單
public class Menu {

    private List<WindowsCommand> menuItemList = new ArrayList<>();

    public void add(WindowsCommand menuItem){
        menuItemList.add(menuItem);
    }
    public void del(WindowsCommand menuItem){
        menuItemList.remove(menuItem);
    }
    public void click(){
        for (WindowsCommand menuItem : menuItemList){
            menuItem.click();
        }
    }

}
